package com.tang.lts.core.nio.processor;

import com.tang.lts.core.nio.channel.NioChannel;
import com.tang.lts.core.nio.handler.Futures;

import java.net.SocketAddress;
import java.nio.channels.SelectionKey;

/**
 * @author Tang
 * @classname NioProcessor
 * @description [  ]
 * @date 2022/5/12 22:59
 */
public interface NioProcessor {

    void accept(SelectionKey key);

    Futures.WriteFuture writeFlush(NioChannel channel, Object msg);

    void read(NioChannel channel);

    void flush(NioChannel channel);

    Futures.ConnectFuture connect(SocketAddress remoteAddress);

    void connect(SelectionKey key);
}
